package cn.wtg.kotlinlib.baseAdapter

import android.content.Context
import android.view.ViewGroup
import androidx.annotation.LayoutRes
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.QuickViewHolder

/**
 * author: wtg
 * time: 2022/12/7
 * desc: 单一的adapter设置
 */
abstract class BaseSingleAdapter<T> : BaseQuickAdapter<T, QuickViewHolder>(){
    override fun onCreateViewHolder(
        context: Context,
        parent: ViewGroup,
        viewType: Int
    ): QuickViewHolder {
        return QuickViewHolder(getRecyclerItemLayout(), parent)
    }

    @LayoutRes
    protected abstract fun getRecyclerItemLayout(): Int
}